
const { create } = require('domain')
const mock = require('mockjs')
const { title } = require('process')
const random = mock.Random



const getQuestionsList = (opt={})=>{
    const {len =10,isDelected = false,isStar = false} = opt
    const list = []

    for(let i=0;i<len;i++){
      list.push({
        id:random.id(),
        title:random.ctitle(),
        isPublished:random.boolean(),
        isStar: isStar ? true:random.boolean(),
        answerCount:random.natural(0,100),
        createdAt:random.datetime(),
        isDelected
      })
    }

    return list
}




module.exports  =getQuestionsList